package com.ankicoo.auth.controller;

import com.ankicoo.auth.entity.AuthUserPO;
import com.ankicoo.auth.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Description: 用户信息
 *
 * @author : QCYANG
 * @date : 2021/1/11 15:10
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/save")
    public void save(@RequestBody AuthUserPO user){
        userService.save(user);
    }

    @GetMapping("/userInfo")
    public AuthUserPO getUserInfo(){
        return userService.findUserInfoByUserId("ankicoo");
    }
}
